package view.controller;

import javafx.scene.control.ScrollPane;
import javafx.scene.layout.FlowPane;
import view.Chat;
import view.GroupChat;

import java.util.HashMap;

//管理页面
public class ManageChat {
    public static HashMap<String, GroupChat> groupchat=new HashMap<>();
    public static HashMap<String, Chat> chat=new HashMap<>();
    public static HashMap<String,ChatController>chatcontroller=new HashMap<>();
    public static HashMap<String, FlowPane>groupchatlist=new HashMap<>();
    public static HashMap<String,ScrollPane>scrollPaneHashMap=new HashMap<>();
    public static HashMap<String,ScrollPane>groupscrollpane=new HashMap<>();
    public static HashMap<String, FlowPane>meesagelist=new HashMap<>();

    public static void setGroupMeesagelist(String id,FlowPane fp) {
        groupchatlist.put(id,fp);
    }
    public static FlowPane getGroupMeesagelist(String id) {
        return groupchatlist.get(id);
    }

    public static void setScrollPaneHashMap(String id,ScrollPane scrollPane){
        scrollPaneHashMap.put(id,scrollPane);
    }
    public static ScrollPane getScrollPaneHashMap(String id){
        return scrollPaneHashMap.get(id);
    }

    public static void setGroupScrollPaneHashMap(String id,ScrollPane scrollPane){
        groupscrollpane.put(id,scrollPane);
    }
    public static ScrollPane getGroupScrollPaneHashMap(String id){
        return groupscrollpane.get(id);
    }

    public static FlowPane getMeesagelist(String id) {
        return meesagelist.get(id);
    }
    public static void setMeesagelist(String id,FlowPane fp) {
        meesagelist.put(id,fp);
    }

    public static ChatController getchatcontroller(String id) {
        return chatcontroller.get(id);
    }
    public static void setChatcontroller(String id,ChatController achat) {
        chatcontroller.put(id,achat);
    }

    public static GroupChat getGroupchat(String id) {
        return groupchat.get(id);
    }
    public static void setGroupchat(String id,GroupChat gchat) {
        groupchat.put(id,gchat);
    }

    public static Chat getChat(String id) {
        return chat.get(id);
    }
    public static void setChat(String id,Chat achat) {
        chat.put(id,achat);
    }

}
